import React, {Component} from 'react';
import AppInfoForm from './component/AppInfoForm';
import UserInfoForm from './component/UserInfoForm';
import FeishuDoc from './component/FeishuDoc';

/**
 * 核心组件
 * 所有的常量资源由顶级组件统一定义
 */
class App extends Component {

    state = {
        appId: 'cli_a03ee1eb59b9500e',
        appSecret: 'W50q9f8mhOYxx7o1clYuEdIBEiTYXc0c',
        redirectUrl: '',
        state: 'state',
    }

    /**
     * 渲染全部的UI
     * @return{React.ReactNode}
     */
    render(): React.ReactNode {
        return (
            <div className="App">
                <header className="App-header">
                    <AppInfoForm appId={this.state.appId} appSecret={this.state.appSecret}/>
                    <UserInfoForm appId={this.state.appId} redirectUrl={this.state.redirectUrl}
                                  state={this.state.state}/>
                    <FeishuDoc/>
                </header>
            </div>
        );
    }
}

export default App;
